<?php
declare (strict_types=1);

namespace app\api\controller;

use app\api\model\MemberSite;

class SetSys extends Base
{
    public function sys()
    {
        return view();
    }

    public function checkCoupon()
    {
        return view();
    }
    public function RobotAll()
    {
return view();
    }


    public function manage()
    {
        $typeName = $this->request->param('typeName');
        if ($typeName == 'getConfigure') {
            $configreName = $this->request->param('configreName');
            $robotId = $this->request->param('robotId');

            if ($configreName == 'checkCoupon') {
                $MemberSite= new MemberSite;
                return $MemberSite->get_datas($robotId, $configreName);


            }else{
                $MemberSite = new MemberSite;
                return $MemberSite->get_datas($robotId, $configreName);
            }

        } else if ($typeName == 'updateConfigure') {
            //post处理
            $data['is_danpin_fanhui_kapian_tb']=null;
            $configreName = $this->request->param('configreName');
            $robotId = $this->request->param('robotId');
            $data = $this->request->param('data');

            $MemberSite = new MemberSite;
            return $MemberSite->edit_one_data($robotId, $data);

        }
    }


}